<!--  start nav -->
<div class="nav">
<div class="table">
<?php if($this->session->userdata('username')):?>
    <?php for($i=0;$i<count($menus);$i++): ?>
        <?php if ($menus[$i]->path != null): ?>
            <ul class="select"><li><a href="<?php echo base_url(); ?>index.php/<?php echo $menus[$i]->path; ?>"><b><?php echo $menus[$i]->Name; ?></b></a>
        <?php else: ?>
            <ul class="select"><li><a href="" onclick="return false"><b><?php echo $menus[$i]->Name; ?></b></a>
        <?php endif; ?>

        <?php for($j=0;$j<count($subMenus);$j++):?>
            <?php if($subMenus[$j]->PARENT_MENU == $menus[$i]->ID):?>
                <div class="select_sub show">
                    <ul class="sub">
                    <?php for($k=0;$k<count($subMenus);$k++):?>
                        <?php if($subMenus[$k]->PARENT_MENU == $menus[$i]->ID) :?>
                            <li><a href="<?php echo base_url()?>index.php/<?php echo $subMenus[$k]->path ?>"><?php echo $subMenus[$k]->Name ?></a></li>
                            <?php $j = $j+1; ?>
                        <?php endif;?>
                    <?php endfor;?>
                    </ul>
                </div>
            <?php endif;?>
        <?php endfor;?>                       
        </li>
        </ul>

    <div class="nav-divider">&nbsp;</div>

    <?php endfor;?>
<?php else: ?>
    <ul class="select"><li><a href="<?php echo base_url(); ?>index.php/Home"><b>Home</b></a></li></ul>
<?php endif;?>


<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<!--  start nav -->

                
                

